<template>
  <div>
    <el-form :model="searchForm" :inline="true" >
      <el-form-item  :label="row.label" v-for="(row,index) of search" :key="index">
        <el-input v-model="searchForm[row.prop]" :placeholder="'请输入'+ row.label" size="mini"></el-input>
      </el-form-item>
      <el-form-item>
        <el-button type="primary" @click="onSubmit" size="mini">查询</el-button>
      </el-form-item>
    </el-form>
  </div>
</template>


<script>

  export default {
    name:'SearchInput',
    props:{
      search:{
        type:Array,
        default:()=>{
          return []
        }
      }
    },
    data(){
      return {
        searchForm:{}
      }
    },
    methods:{
      onSubmit(){
        this.$emit('getSerachInputParam',this.searchForm)
      }
    }
  }

</script>


<style>

</style>
